//! \file memory_utils.h

#ifndef _MEMORY_UTILS_H_
#define _MEMORY_UTILS_H_

//------------------------------------------------------------------------------

#include "defs.h"
#include "check.h"

//------------------------------------------------------------------------------

//! \brief Read data from addr to vptr.
TBGError ReadData(addr_t addr, void *vptr, unsigned int len_in_addrs);

TBGError ReadByteData(addr_t addr, void *vptr, unsigned int len);

TBGError ReadStr(addr_t addr, unsigned int len, char *ret);

TBGError GetRegisters(addr_t *regs);

#ifdef USE_PTRACE
#include "linux_ptrace_utils.h"
ptrace_session* PtraceGetSetSession(ptrace_session *psession);
#endif

//------------------------------------------------------------------------------

#endif //_MEMORY_UTILS_H_
